#!/usr/bin/env python
#coding=utf-8
import os
import sys

def file_f(filename):
    print "filename:", file
    hosts = file(filename)
    try:
        for line in hosts:
            if line.startswith('#'):
                continue
            print line,
    finally:
        hosts.close()

def judgeYear(year):
    message = ''
    if ((year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0)):
        message = 'RUN'
    else:
        message = 'PING'
    return message


if __name__ == "__main__":
    ##file_f(filename='/etc/hosts')
    with file('/etc/hosts') as w_f:
        for line in w_f:
            if line.startswith('#'):
                continue
            print line,
    year = 2015
    if (len(sys.argv) > 1):
        print sys.argv
        year = int(sys.argv[1])
    print "%d is: %s" % (year, judgeYear(year))
    for year in range(year - 20, year + 20):
        print "%d is: %s" % (year, judgeYear(year))
